/**
 * 
 */
package com.googlecode.xcarve.transport;

import com.googlecode.xcarve.exception.CarveException;


/**
 * @author duxinyun
 *
 */
public interface Server {
	
    /**
     * send message.
     * 
     * @param message
     * @throws CarveException
     */
    void send(Object message) throws CarveException;

    /**
     * send message.
     * 
     * @param message
     * @param sent 是否已发送完成
     */
    void send(Object message, boolean sent) throws CarveException;

	
	void close();
	
	void close(int timeout);
	
	boolean isClosed();
}
